
    $("#tijiao").onclick = function(){
        //获取表单数据
        let username = $("#username").value;
        let password = $("#password").value;
        let mobile = $("#mobile").value;

        //创建xhr对象
        let xhr = new XMLHttpRequest();

        //实现open方法
        xhr.open("get","./api/add_userdata.php?username="+username+"&password="+password+"&mobile="+mobile);

        //发送请求
        xhr.send();

        //设置监听状态
        xhr.onreadystatechange = function(){
            if( xhr.readyState === 4 && xhr.status === 200 ){
                console.log( xhr.responseText );
            }
        }

        
    }